package cn.edu.jmu.oelp.service.impl;

import cn.edu.jmu.oelp.mapper.TypeMapper;
import cn.edu.jmu.oelp.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    TypeMapper typeMapper;

    @Override
    public List<String> findTypes(int artId) {
        return typeMapper.findByArticle(artId);
    }

    @Override
    public boolean addType(String type, int artId) {
        return typeMapper.insertTypes(type,artId);
    }


}
